package com.xuwang.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 案件备案表
 * @author jesse
 */
@ApiModel(value = "案件备案表")
public class CaseFiling {
    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Integer id;

    /**
     * 程序类别
     */
    @ApiModelProperty(value = "程序类别")
    private Integer type;

    /**
     * 案件来源
     */
    @ApiModelProperty(value = "案件来源")
    private Integer sourceOfTheCase;

    /**
     * 违法行为类别
     */
    @ApiModelProperty(value = "违法行为类别")
    private Integer typesOfViolations;

    /**
     * 单位或个人
     */
    @ApiModelProperty(value = "单位或个人")
    private Integer individual;

    /**
     * 单位类别
     */
    @ApiModelProperty(value = "单位类别")
    private Integer companyType;

    /**
     * 单位名称
     */
    @ApiModelProperty(value = "单位名称")
    private String companyName;

    /**
     * 许可证
     */
    @ApiModelProperty(value = "许可证")
    private String licenseKey;

    /**
     * 地址
     */
    @ApiModelProperty(value = "地址")
    private String address;

    /**
     * 所在区域
     */
    @ApiModelProperty(value = "所在区域")
    private String area;

    /**
     * 案由
     */
    @ApiModelProperty(value = "案由")
    private String causeOfTheCase;

    /**
     * 主办人 （政府工作人员表）
     */
    @ApiModelProperty(value = "主办人 （政府工作人员表）")
    private String governmentStaffName;

    /**
     * 所属部门（政府部门表）
     */
    @ApiModelProperty(value = "所属部门（政府部门表）")
    private String governmentDepartmentName;

    /**
     * 备案号
     */
    @ApiModelProperty(value = "备案号")
    private String recordNumber;

    /**
     * 备案日期
     */
    @ApiModelProperty(value = "备案日期")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    // 下面是服务器响应返回的内容，如果没有格式化转换，那么返回的内容是长毫秒数，接收mysql数据库中的数据也需要设置东八区+8时
    @JsonFormat(pattern="yyyy-MM-dd", timezone = "GMT+8")
    private Date filingDate;

    public Integer getId () {
        return id;
    }

    public void setId (Integer id) {
        this.id = id;
    }

    public Integer getType () {
        return type;
    }

    public void setType (Integer type) {
        this.type = type;
    }

    public Integer getSourceOfTheCase () {
        return sourceOfTheCase;
    }

    public void setSourceOfTheCase (Integer sourceOfTheCase) {
        this.sourceOfTheCase = sourceOfTheCase;
    }

    public Integer getTypesOfViolations () {
        return typesOfViolations;
    }

    public void setTypesOfViolations (Integer typesOfViolations) {
        this.typesOfViolations = typesOfViolations;
    }

    public Integer getIndividual () {
        return individual;
    }

    public void setIndividual (Integer individual) {
        this.individual = individual;
    }

    public Integer getCompanyType () {
        return companyType;
    }

    public void setCompanyType (Integer companyType) {
        this.companyType = companyType;
    }

    public String getCompanyName () {
        return companyName;
    }

    public void setCompanyName (String companyName) {
        this.companyName = companyName == null ? null : companyName.trim();
    }

    public String getLicenseKey () {
        return licenseKey;
    }

    public void setLicenseKey (String licenseKey) {
        this.licenseKey = licenseKey == null ? null : licenseKey.trim();
    }

    public String getAddress () {
        return address;
    }

    public void setAddress (String address) {
        this.address = address == null ? null : address.trim();
    }

    public String getArea () {
        return area;
    }

    public void setArea (String area) {
        this.area = area == null ? null : area.trim();
    }

    public String getCauseOfTheCase () {
        return causeOfTheCase;
    }

    public void setCauseOfTheCase (String causeOfTheCase) {
        this.causeOfTheCase = causeOfTheCase == null ? null : causeOfTheCase.trim();
    }

    public String getGovernmentStaffName () {
        return governmentStaffName;
    }

    public void setGovernmentStaffName (String governmentStaffName) {
        this.governmentStaffName = governmentStaffName == null ? null : governmentStaffName.trim();
    }

    public String getGovernmentDepartmentName () {
        return governmentDepartmentName;
    }

    public void setGovernmentDepartmentName (String governmentDepartmentName) {
        this.governmentDepartmentName = governmentDepartmentName == null ? null : governmentDepartmentName.trim();
    }

    public String getRecordNumber () {
        return recordNumber;
    }

    public void setRecordNumber (String recordNumber) {
        this.recordNumber = recordNumber == null ? null : recordNumber.trim();
    }

    public Date getFilingDate () {
        return filingDate;
    }

    public void setFilingDate (Date filingDate) {
        this.filingDate = filingDate;
    }

    @Override
    public String toString () {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", type=").append(type);
        sb.append(", sourceOfTheCase=").append(sourceOfTheCase);
        sb.append(", typesOfViolations=").append(typesOfViolations);
        sb.append(", individual=").append(individual);
        sb.append(", companyType=").append(companyType);
        sb.append(", companyName=").append(companyName);
        sb.append(", licenseKey=").append(licenseKey);
        sb.append(", address=").append(address);
        sb.append(", area=").append(area);
        sb.append(", causeOfTheCase=").append(causeOfTheCase);
        sb.append(", governmentStaffName=").append(governmentStaffName);
        sb.append(", governmentDepartmentName=").append(governmentDepartmentName);
        sb.append(", recordNumber=").append(recordNumber);
        sb.append(", filingDate=").append(filingDate);
        sb.append("]");
        return sb.toString();
    }
}